package com.woniuxy.his.service.impl;

import com.woniuxy.his.entity.CheckDetail;
import com.woniuxy.his.mapper.CheckDetailMapper;
import com.woniuxy.his.service.ICheckDetailService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.woniuxy.his.vo.CheckDetailsVo;
import com.woniuxy.his.vo.CheckPayVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 检查详情表 服务实现类
 * </p>
 *
 * @author Lucas
 * @since 2021-08-24
 */
@Service
@Slf4j
public class CheckDetailServiceImpl extends ServiceImpl<CheckDetailMapper, CheckDetail> implements ICheckDetailService {

    @Resource
    private CheckDetailMapper checkDetailMapper;

    /**
     * 根据项目检查详情表查询病人详细信息
     * @param checkDetailId
     * @return
     */
    @Override
    public CheckDetailsVo inspectShoutByCheckDetailId(Integer checkDetailId) {
        log.info("检查详情表ID：{}",checkDetailId);
        CheckDetailsVo checkDetailsVo = checkDetailMapper.inspectShoutByCheckDetailId(checkDetailId);
        log.info("检查详情信息Service层返回结果：{}",checkDetailsVo);
        return checkDetailsVo;
    }

    @Override
    public List<CheckPayVo> showCheckMsgByCheckId(Integer checkId) {
        List<CheckPayVo> msgOfOneByCheckId = checkDetailMapper.showCheckMsgByCheckId(checkId);
        return msgOfOneByCheckId;
    }
}
